package com.yunjie.action;

import java.util.Map;

import org.apache.struts2.interceptor.ApplicationAware;
import org.apache.struts2.interceptor.ParameterAware;
import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
/**
 * 所有Action类的父类
 * @author guoyou
 */
public class BaseAction extends ActionSupport implements RequestAware,
		SessionAware, ApplicationAware, ParameterAware {
	private static final long serialVersionUID = 6987879820020598869L;
	//当前页码，子类可以直接使用
	protected int start = 1;
	//当前页面容量，子类可以直接使用
	protected int limit = 10;
	protected int page = 1;
	protected String _dc;
	protected Integer id;
	//所有POJO对象的id数组
	protected Integer[] ids;
	protected Integer parentId;
	// Map类型的request
	protected Map<String, Object> request;
	// Map类型的session
	protected Map<String, Object> session;
	// Map类型的application
	protected Map<String, Object> application;
	
	protected Map<String, String[]> parameterMaps;
	
	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public void setRequest(Map<String, Object> request) {
		// 获取Map类型的request赋值
		this.request = request;
	}

	public void setApplication(Map<String, Object> application) {
		// 获取Map类型的application赋值
		this.application = application;
	}

	public void setSession(Map<String, Object> session) {
		// 获取Map类型的session赋值
		this.session = session;
	}
	
	public void setParameters(Map<String,String[]> parameters) {
		this.parameterMaps = parameters;
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}

	public String get_dc() {
		return _dc;
	}

	public void set_dc(String _dc) {
		this._dc = _dc;
	}

	public Integer[] getIds() {
		return ids;
	}

	public void setIds(Integer[] ids) {
		this.ids = ids;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}
}
